//
//  MyCTMediaCate.swift
//  MyCTmediaCate
//
//  Created by XFGuo on 2019/2/22.
//

import Foundation

import CTMediator

extension CTMediator {
    
    @objc public func Module_viewControllerWithCallback(targetName : String, actionName : String,swiftTargetName : String , paramters : NSMutableDictionary, callback:@escaping (NSDictionary) -> Void) -> UIViewController? {
        
        paramters[kCTMediatorParamsKeySwiftTargetModuleName] = swiftTargetName
        
        paramters["callback"] = callback

        if let viewController = self.performTarget(targetName, action: actionName, params: paramters as? [AnyHashable : Any], shouldCacheTarget: false) as? UIViewController {
            return viewController
        }

        return nil
    }

}
